package finalproject.model.items;

import finalproject.model.player.Energy;
import finalproject.model.player.Player;
import finalproject.view.StringManager;
/**
 * The pet food item
 * Restore a pet some energy
 * @author Shafiq Daniel
 *
 */
/**
 * A PetFood is similar to Coffee, but the effect is on pet of a player.
 * Thus it is used to give energy to a player's pet.
 * 
 * @author Shafiq Daniel
 *
 */

public class PetFood extends Item{
	
	/**
	 * The amount of energy restored by the item
	 */
	private final static int PET_REGENERATION = 10;

	public PetFood() {
		super(StringManager.getString("petfood"), StringManager.getString("petfooddescription"), 1, true, false, false);
		// TODO Auto-generated constructor stub
	}

	@Override
	public void use(Player player) {
		// TODO Auto-generated method stub
		Energy petEnergy = player.getPet().getBadge().getEnergie();
		petEnergy.setEnergy(petEnergy.getEnergy() + PET_REGENERATION);
		StringManager.outPut("feedpet");		
	}
	
}
